package main

import "fmt"

func solution(cards []int) int {
	// Edit your code here
    countMap := make(map[int]int)
    for _, num := range cards {
        countMap[num]++
    }
    for num, count := range countMap {
        if count == 1 {
            return num
        }
    }
	return -1
}

func main() {
	// Add your test cases here

	fmt.Println(solution([]int{1, 1, 2, 2, 3, 3, 4, 5, 5}) == 4)
	fmt.Println(solution([]int{0, 1, 0, 1, 2}) == 2)
}